const express = require('express')
// 创建路由对象
const router = express.Router()

const userRouter = require('../router_handle/user')



router.post('/login', userRouter.login)   // 登录

router.post('/saveUserInfo', userRouter.saveUserInfo)  //保存登录信息到用户表

router.get('/room', userRouter.roomMessage)  //获取房间所有信息

router.get('/getImages/:roomId', userRouter.getImage) //根据房间id获取详情照片

router.get('/getMessage/:roomId', userRouter.getMessageImage) //根据房间id获取房间通知

router.get('/getRoomName/:roomId', userRouter.getRoomName) //根据房间id获取房间名称

router.get('/orderMessage', userRouter.orderMessage)

router.post('/usedRoom/:status/:room_id', userRouter.usedRoom)//更新房间表的状态

router.post('/completedOrder', userRouter.completedOrder)

router.get('/getReviews', userRouter.getReviews)

router.post('/getReviewImg', userRouter.getReviewImg)

router.get('/getuserinfo/:user_id', userRouter.getuserinfo)

router.post('/uplike', userRouter.uplike)

router.post('/InsteComment', userRouter.InsteComment)

router.get('/selComment/:order_id', userRouter.selComment)

// 将路由对象共享出去
module.exports = router